import { Injectable } from '@angular/core';
import { HOSTURL, FILEURL, version, PREFIX } from '../../../config';
import { RequestClientService } from '../../request-client.service';

@Injectable({
  providedIn: 'root'
})
export class PersonalService {

  constructor(
    private requestClientService: RequestClientService
  ) { }

  // 获取登录人信息
  public async getUser(params) {
    const res = await this.requestClientService.get(HOSTURL + `/api/services/${PREFIX}/User/GetUsers`, params);
    return res;
  }
  // 修改密码
  public async editPassword(params) {
    const res = await this.requestClientService.post(HOSTURL + `/api/services/${PREFIX}/Profile/ChangePassword`, params);
    return res;
  }
  // 修改个人信息
  public async editUser(params) {
    const res = await this.requestClientService.put(HOSTURL + `/api/services/${PREFIX}/Profile/UpdateUserProfile`, params);
    return res;
  }
  // 同步千变数据隐藏接口 左
  public async async1() {
    const res = await this.requestClientService.post(HOSTURL + `/api/services/juneng/Qianbian/Async1`);
    return res;
  }
  // 同步千变数据隐藏接口 右
  public async async2() {
    const res = await this.requestClientService.post(HOSTURL + `/api/services/juneng/Qianbian/Async2`);
    return res;
  }
}
